using System;
using System.Collections.Generic;
using System.Text;

namespace Developex.DatabaseWrapper
{
	/// <summary>
	/// Warning
	/// </summary>
	public class DatabaseWarning
	{
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="message"></param>
		/// <param name="path"></param>
		/// <param name="objectType"></param>
		public DatabaseWarning(string message, string path, Type objectType)
		{
			Message = message;
			Path = path;
			ObjectType = objectType;
		}

		/// <summary>
		/// Error message
		/// </summary>
		public string Message;

		/// <summary>
		/// Where exception was catched
		/// </summary>
		public string Path;

		/// <summary>
		/// Type of object where exception was catched
		/// </summary>
		public Type ObjectType;

		/// <summary>
		/// Default ToString output
		/// </summary>
		/// <returns></returns>
		public override string ToString()
		{
			return string.Format("Error message: {0}\r\nObject type:{1}\r\nPath: {2}", Message, ObjectType.FullName, Path);
		}
	}
}
